package com.zdw.gateway.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zdw.gateway.entity.PermissionEntity;
import com.zdw.gateway.mapper.PermissionMapper;
import com.zdw.gateway.service.PermissionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 卓德文
 * @since 2023-01-04
 */
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, PermissionEntity> implements PermissionService {

    /**
     * 根据ID查询用户权限
     *
     * @param id
     * @return
     */
    @Override
    public List<PermissionEntity> selectPermissionsByUserId(Integer id) {
        return this.baseMapper.selectPermissionsByUserId(id);
    }
}
